<?php
/**
 * Created by PhpStorm.
 * User: zhongyb
 * Date: 2016/8/17
 * Time: 20:58
 */
namespace common\entities\myhtsq;

use Yii;
/**
 * This is the model class for table "myscrm_contract_delivery_change_log".
 *
 * @property string $logId
 * @property string $ContractId
 * @property string $CreatedOn
 * @property string $CreatedBy
 * @property string $Deliver
 * @property string $DeliverPhone
 * @property string $DeliverEmail
 * @property string $CustomManager
 * @property string $CustomManagerPhone
 * @property string $CustomManagerEmail
 */
class MyscrmContractDeliveryChangeLogEntity extends \common\entities\ConfigEntity
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'myscrm_contract_delivery_change_log';
    }

    /**
     * @return \yii\db\Connection the database connection used by this AR class.
     */
    public static function getDb()
    {
        return Yii::$app->get('cdb');
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['logId', 'ContractId'], 'required'],
            [['CreatedOn'], 'safe'],
            [['logId', 'ContractId', 'CreatedBy'], 'string', 'max' => 36],
            [['Deliver', 'DeliverPhone', 'DeliverEmail', 'CustomManager', 'CustomManagerPhone', 'CustomManagerEmail'], 'string', 'max' => 200]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'logId' => '唯一ID',
            'ContractId' => '租户ID',
            'CreatedOn' => '创建时间',
            'CreatedBy' => '创建人',
            'Deliver' => '交付顾问',
            'DeliverPhone' => '交付顾问电话',
            'DeliverEmail' => '交付顾问邮箱',
            'CustomManager' => '客户经理',
            'CustomManagerPhone' => '客户经理电话',
            'CustomManagerEmail' => '客户经理邮箱',
        ];
    }
}